<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

/*return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];*/

use think\Route;

Route::post('api/:version/member/register', 'api/:version.Member/register');
Route::post('api/:version/member/login', 'api/:version.Member/login');
Route::get('api/:version/member/outlogin', 'api/:version.Member/outlogin');
Route::post('api/:version/member/lists', 'api/:version.Member/lists');//后台

Route::get('api/:version/area/province', 'api/:version.Area/province');
Route::get('api/:version/area/city/:id', 'api/:version.Area/city');
Route::get('api/:version/area/area/:id', 'api/:version.Area/area');

Route::post('api/:version/address/add', 'api/:version.Address/add');
Route::post('api/:version/address/update', 'api/:version.Address/update');
Route::get('api/:version/address/lists', 'api/:version.Address/lists');
Route::get('api/:version/address/del/:id', 'api/:version.Address/del');
Route::post('api/:version/address/updatedef', 'api/:version.Address/updatedef');
Route::get('api/:version/address/find/:id', 'api/:version.Address/find');

Route::post('api/:version/payment/add', 'api/:version.Payment/add');
Route::post('api/:version/payment/update', 'api/:version.Payment/update');
Route::get('api/:version/payment/lists', 'api/:version.Payment/lists');
Route::get('api/:version/payment/del/:id', 'api/:version.Payment/del');
Route::post('api/:version/payment/updatedef', 'api/:version.Payment/updatedef');
Route::get('api/:version/payment/find/:id', 'api/:version.Payment/find');


/**后台**/
Route::post('api/:version/goodscat/add', 'api/:version.Goodscat/add');
Route::post('api/:version/goodscat/update', 'api/:version.Goodscat/update');
Route::get('api/:version/goodscat/lists', 'api/:version.Goodscat/lists');
Route::get('api/:version/goodscat/del/:id', 'api/:version.Goodscat/del');
Route::get('api/:version/goodscat/find/:id', 'api/:version.Goodscat/find');
Route::post('api/:version/goods/add', 'api/:version.Goods/add');
Route::post('api/:version/goods/update', 'api/:version.Goods/update');
Route::post('api/:version/goods/lists', 'api/:version.Goods/lists');
Route::get('api/:version/goods/del/:id', 'api/:version.Goods/del');
Route::get('api/:version/goods/find/:id', 'api/:version.Goods/find');

/**前台**/
Route::get('api/:version/goodscat/homelists', 'api/:version.Goodscat/homelists');
Route::post('api/:version/goods/homelists', 'api/:version.Goods/homelists');
Route::get('api/:version/goods/homefind/:id', 'api/:version.Goods/homefind');

Route::post('api/:version/goodsorder/add', 'api/:version.Goodsorder/add');
Route::post('api/:version/goodsorder/lists', 'api/:version.Goodsorder/lists');
Route::get('api/:version/goodsorder/del/:id', 'api/:version.goodsorder/del');
Route::get('api/:version/goodsorder/find/:id', 'api/:version.goodsorder/find');

//Route::post('api/:version/returnorder/add', 'api/:version.Returnorder/add');
Route::get('api/:version/returnorder/find/:oid', 'api/:version.Returnorder/find');

Route::post('api/:version/:controller/:action', 'api/:version.:controller/:action');
Route::get('api/:version/:controller/:action', 'api/:version.:controller/:action');

